package servlet;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import action.common.RepertoryAction;
import action.common.StockPlanAction;
import model.common.Repertory;
import model.common.StockPlan;
public class ShowRepertory extends HttpServlet {
	private static final long serialVersionUID = 1L;
    public ShowRepertory() {
        super();
    }
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doPost(request, response);
	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		request.setCharacterEncoding("utf-8");
        response.setContentType("text/html; charset=utf-8");
		List<Repertory> list=new ArrayList<Repertory>(); 
		RepertoryAction act=new RepertoryAction();
		try {
			list=act.query(null);
			request.getSession().setAttribute("Repertory",list);
			System.out.println("123");
			response.sendRedirect("repertory.jsp");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	}


